package cn.stylefeng.guns.modular.controller;

import cn.stylefeng.guns.core.pojo.response.ResponseData;
import cn.stylefeng.guns.core.pojo.response.SuccessResponseData;
import cn.stylefeng.guns.modular.service.SeatService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 李宝嘉
 * @Date 2022/1/1 14:19
 */
@RestController
@RequestMapping("/seat")
public class SeatController {
    @Resource
    private SeatService seatService;

    @GetMapping("/list/by/room")
    public ResponseData getSeatListByRoomId(@RequestParam Long roomId, @RequestParam String date) {
        return new SuccessResponseData(seatService.getSeatListByRoomId(roomId, date));

    }
}
